<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSystemMsgTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('system_msg', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('company_id')->comment('公司ID');
            $table->integer('send_id')->comment('发送人ID');
            $table->integer('msg_id')->comment('消息ID');
            $table->text('content')->comment('消息内容');
            $table->integer('created_at')->comment('创建时间');
            $table->integer('updated_at')->comment('最后更新时间');
        });
        DB::statement("ALTER TABLE `system_msg` comment '系统消息表'");
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('system_msg');
    }
}
